package com.study.example.gameserver.module.buff.effect;

import com.sparrow.common.buff.domain.Buff;
import com.sparrow.common.buff.effect.AbstractBuffEffect;
import com.sparrow.common.buff.effect.anno.BuffEffect;
import com.study.example.gameserver.module.player.entity.Player;

@BuffEffect("DoubleExp")
public class DoubleExpBuffEffect extends AbstractBuffEffect {
    @Override
    public void onStart(Buff buff) {
        Player player = getTarget(buff);
        System.out.println(player.getPlayerName() + " 添加双倍经验buff 倍数=" + 1);
    }

    @Override
    public void onTick(Buff buff, long now) {
        Player player = getTarget(buff);
        System.out.println(player.getPlayerName() + " tick 双倍经验buff");
    }

    @Override
    public void onExpire(Buff buff) {
        Player player = getTarget(buff);
        System.out.println(player.getPlayerName() + " 移除 双倍经验buff");
    }

}
